public final class InstanceId extends Object implements Comparable<InstanceId>
Java class represents a classification for the instances in a deployed SAP CC Core Server system; This classification identifies a system instance by an instance type
associated to a number that identifies the instances of the same type. This number is positive and not null and is defined at installation time.
Examples
dispatcher#1
rater#1
Note
This classification is defined for an SAP CC system. If your system landscape includes two SAP CC systems, two instances may have the same identifier, but belonging to different SAP CC systems. For example dispatcher#1 and rater#1 are present on both SAP CC systems.
InstanceType,
InstanceMap| Modifier and Type | Field and Description |
|---|---|
static char |
SEPARATOR
The string representation of the separator used in the syntax of an instance ID: '#'
Refer to the
marshal() and unmarshal() methods |
static InstanceId |
UPDATER_ID
Instance ID of the updater instance of the SAP CC system
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(InstanceId other) |
boolean |
equals(Object obj) |
static InstanceId |
getInstanceId(InstanceType instanceType,
int instanceNum)
Returns an
InstanceId object built from the specified instance type and a positive number |
int |
getInstanceNum()
Returns the number of an instance with the same type.
|
InstanceType |
getInstanceType()
Returns the instance type of the current instance ID.
|
int |
hashCode() |
static String |
marshal(InstanceId instanceId)
Marshals the
InstanceId object into a string;
The string result has the following syntax: <INSTANCE_TYPE>SEPARATOR<NUMBER> |
static void |
marshal(InstanceId instanceId,
com.highdeal.hmi.DataBuffer buffer)
Marshals the
InstanceId object into the specified data buffer. |
String |
toString() |
static InstanceId |
unmarshal(com.highdeal.hmi.IDataBuffer buffer)
Extracts an
InstanceId object from the data buffer specified as argument. |
static InstanceId |
unmarshal(String instanceId)
Unmarshals the string representation of an instance ID into an
InstanceId object;
The string argument have to respect the following grammar: <INSTANCE_TYPE>SEPARATOR<NUMBER> |
public static final char SEPARATOR
marshal() and unmarshal() methodspublic static final InstanceId UPDATER_ID
public InstanceType getInstanceType()
instance typepublic int getInstanceNum()
public int compareTo(InstanceId other)
compareTo in interface Comparable<InstanceId>public static final String marshal(InstanceId instanceId) throws IllegalArgumentException
InstanceId object into a string;
The string result has the following syntax: <INSTANCE_TYPE>SEPARATOR<NUMBER>instanceId - The instanceId to marshalIllegalArgumentException - when the argument is nullpublic static final InstanceId unmarshal(String instanceId) throws IllegalArgumentException, NumberFormatException
InstanceId object;
The string argument have to respect the following grammar: <INSTANCE_TYPE>SEPARATOR<NUMBER>instanceId - The result instanceId objectIllegalArgumentException - When the string argument does not respect the format or is nullNumberFormatException - When the second part of the string is not a positive numberpublic static final void marshal(InstanceId instanceId, com.highdeal.hmi.DataBuffer buffer) throws IllegalArgumentException, BufferOverflowException
InstanceId object into the specified data buffer.instanceId - buffer - The result data bufferIllegalArgumentException - When one is nullBufferOverflowException - If the buffer has not at least six bytes freepublic static final InstanceId unmarshal(com.highdeal.hmi.IDataBuffer buffer) throws IllegalArgumentException, BufferUnderflowException
InstanceId object from the data buffer specified as argument.buffer - The input data bufferInstanceId object extracted from the bufferIllegalArgumentException - When the data buffer is nullBufferUnderflowException - If the buffer has not at least six bytes remainingpublic static final InstanceId getInstanceId(InstanceType instanceType, int instanceNum) throws IllegalArgumentException
InstanceId object built from the specified instance type and a positive numberinstanceType - From the InstanceTypeinstanceNum - A positive numberInstanceId object builtIllegalArgumentException - When the instanceType is null or instanceNum is not positive and not null